package com.eling.elcms.community.model;

import com.eling.elcms.basedoc.model.AdministrativeDivision;
import com.eling.elcms.core.model.BaseModel;
import org.hibernate.search.annotations.DocumentId;
import org.hibernate.search.annotations.Indexed;

import javax.persistence.*;
/**
 * 开户银行许可
 * @author Wen
 *
 */
@Entity
@Indexed
@Table(name = "cm_bankpermission")
public class BankPermission extends BaseModel {
    
	private static final long serialVersionUID = -4306317477490748871L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@DocumentId
	private Long pkBankPermission;
    
	/**银行开户名*/
	@Column
	private String name;
	
	 /**银行账号*/
	@Column
	private String bankCardNo;
	
	/**银行名称*/
	@Column
	private String bankName;
	
	/**银行联行号*/
	@Column
	private String cnaps;
	
	/** 银行所在地*/
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "pkAddress")
	private AdministrativeDivision address;
	
	/** 许可证照片*/
	@Column
	private String bankPermissionPhoto;
	
    @Version
	private Integer version;

	public Long getPkBankPermission() {
		return pkBankPermission;
	}

	public void setPkBankPermission(Long pkBankPermission) {
		this.pkBankPermission = pkBankPermission;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getBankCardNo() {
		return bankCardNo;
	}

	public void setBankCardNo(String bankCardNo) {
		this.bankCardNo = bankCardNo;
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getCnaps() {
		return cnaps;
	}

	public void setCnaps(String cnaps) {
		this.cnaps = cnaps;
	}

	public AdministrativeDivision getAddress() {
		return address;
	}

	public void setAddress(AdministrativeDivision address) {
		this.address = address;
	}

	public String getBankPermissionPhoto() {
		return bankPermissionPhoto;
	}

	public void setBankPermissionPhoto(String bankPermissionPhoto) {
		this.bankPermissionPhoto = bankPermissionPhoto;
	}

	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}
}
